package org.jash.sportnews2109.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.alibaba.android.arouter.launcher.ARouter

@Entity
data class Video(
    val comments: Int,
    val createTime: String,
    val flag: Int,
    @PrimaryKey
    val id: Int,
    val imgurl: String,
    val info: String,
    val liked: Int,
    val likes: Int,
    val looks: Int,
    val suid: Int,
    val title: String,
    val type: Int,
    val videourl: String
) {
    fun playVideo() {
        ARouter.getInstance().build("/news/player")
            .withInt("id", id)
            .navigation()
    }
}